package com.ruoyi.member.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.member.mapper.MemberMapper;
import com.ruoyi.member.domain.Member;
import com.ruoyi.member.service.IMemberService;
import sun.dc.pr.PRError;

/**
 * 会员信息Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-04-07
 */
@Service
public class MemberServiceImpl implements IMemberService 
{
    @Autowired
    private MemberMapper memberMapper;


    /**
     * 查询会员信息
     * 
     * @param memberId 会员信息主键
     * @return 会员信息
     */
    @Override
    public Member selectMemberByMemberId(Integer memberId)
    {
        return memberMapper.selectMemberByMemberId(memberId);
    }

    /**
     * 查询会员信息列表
     * 
     * @param member 会员信息
     * @return 会员信息
     */
    @Override
    public List<Member> selectMemberList(Member member)
    {
        return memberMapper.selectMemberList(member);
    }

    /**
     * 新增会员信息
     * 
     * @param member 会员信息
     * @return 结果
     */
    @Override
    public int insertMember(Member member)
    {
        return memberMapper.insertMember(member);
    }

    /**
     * 修改会员信息
     * 
     * @param member 会员信息
     * @return 结果
     */
    @Override
    public int updateMember(Member member)
    {
        return memberMapper.updateMember(member);
    }

    /**
     * 批量删除会员信息
     * 
     * @param memberIds 需要删除的会员信息主键
     * @return 结果
     */
    @Override
    public int deleteMemberByMemberIds(Integer[] memberIds)
    {
        return memberMapper.deleteMemberByMemberIds(memberIds);
    }

    /**
     * 删除会员信息信息
     * 
     * @param memberId 会员信息主键
     * @return 结果
     */
    @Override
    public int deleteMemberByMemberId(Integer memberId)
    {
        return memberMapper.deleteMemberByMemberId(memberId);
    }

    /***
     * 王雅诺需要的模块
     */

    @Override
    public List<Member> getPerson(Integer personId) {
        return memberMapper.getPerson(personId);
    }

    @Override
    public Member getEmailByName(String memberName) {
        return memberMapper.getEmailByName(memberName);
    }


}
